Dynomotion

Group: DynoMotion Message: 5960 From: Gernot Date: 11/5/2012
Subject: comunication KMotionCNC to Kflop
Hello,

is possible then i press Zero button in KMotionCNC c programm in kflop can reaction?
Example: Button Zero press in KMotionCNC -> Kflop c programm

for(;;)
{
if pressed zero then Zero(0);
}

Problem is then i pressed Zero the dro not 0.
I have connected encoders on axes.
Okay the problem can resolved with custom Buttons but i dont want it.

Sorry for my english.

Regards

Gerry
Group: DynoMotion Message: 5962 From: Tom Kerekes Date: 11/5/2012
Subject: Re: comunication KMotionCNC to Kflop
Hi Gerry,

You would need to edit compile KMotionCNC to change how the Zero button works.  You could add an external button.

But I don't understand why the Zero Button doesn't work.  Regardless of whether you have encoders or not.  The Zero button adjusts the G92 offsets so the DRO will read zero.  You do not need to zero the machine coordinates to make the DRO read zero unless you have machine coordinates selected.

Regards
TK

Group: DynoMotion Message: 5964 From: Gernot Date: 11/5/2012
Subject: Re: comunication KMotionCNC to Kflop
Hello,

the problem is then the dro looks blue and i press Zero the dro not null.

I start kmotion - press init -
init is init.c
ch0->InputMode=ENCODER_MODE;
ch0->OutputMode=STEP_DIR_MODE;
...
ch0->InputChan0=0;
ch0->InputChan1=0;
ch0->OutputChan0=8;
ch0->OutputChan1=0;
ch0->MasterAxis=-1;
ch0->LimitSwitchOptions=0x0;
ch0->InputGain0=2;
ch0->InputGain1=2;
ch0->InputOffset0=0;
ch0->InputOffset1=0;
...
EnableAxisDest(0,0);

and so on ch1 and ch2

DefineCoordSystem(0,1,2,-1);

Zero(0);
Zero(1);
Zero(2);

now the DRO is Null
now i move the axes the dro is ex. 100.0000
now i press Zero but without function
Is DRO looks green i can set to Null or what ever.
Hmm i want set Glas encoders to Null.
Or is encoder position = machine position and this cant set null?
Perhaps i do something wrong?

Gerry

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Gerry,
>
> You would need to edit compile KMotionCNC to change how the Zero button works.  You could add an external button.
>
> But I don't understand why the Zero Button doesn't work.  Regardless of whether you have encoders or not.  The Zero button adjusts the G92 offsets so the DRO will read zero.  You do not need to zero the machine coordinates to make the DRO read zero unless you have machine coordinates selected.
>
> Regards
> TK
>
>
>
> ________________________________
> From: Gernot <web.work@...>
> To: DynoMotion@yahoogroups.com
> Sent: Monday, November 5, 2012 3:59 AM
> Subject: [DynoMotion] comunication KMotionCNC to Kflop
>
>
>  
> Hello,
>
> is possible then i press Zero button in KMotionCNC c programm in kflop can reaction?
> Example: Button Zero press in KMotionCNC -> Kflop c programm
>
> for(;;)
> {
> if pressed zero then Zero(0);
> }
>
> Problem is then i pressed Zero the dro not 0.
> I have connected encoders on axes.
> Okay the problem can resolved with custom Buttons but i dont want it.
>
> Sorry for my english.
>
> Regards
>
> Gerry
>
Group: DynoMotion Message: 5965 From: Tom Kerekes Date: 11/5/2012
Subject: Re: comunication KMotionCNC to Kflop
Hi Gerry,
 
What type of system/drives do you have?  You have Step/Dir + Encoders?  What kind of encoders?
 
When things are working correctly the Encoder Position should match the Step/Dir Destination
 
After in your example when you move to DRO=100.0 go to the KMotion.exe Axis Screen and look at the Position and Destination.  Do they match?  (within several counts?).
 
If not the resolution of your encoder may be different then your Steps.  You can use the InputGain0 parameter to match the resolutions.
 
If you do a Move on the Step Response the Positions and Destinations should match (red and blue plots).  Is this true?
 
The Zero button computes a G92 offset such that the commanded Destination in GCode coordinates will become zero (green plot), the encoder position in GCode coordinates (blue plot) should also be zero or very close to zero depending on the error in the system.
 
You might also consider using closed loop step/dir mode.  This would drive the motor so the measured encoder position matches the commanded destination more exactly.  But do this only after you have the encoder and command matching as close as possible in open loop mode.
 
Regards
TK
 
 
 
 
 

Group: DynoMotion Message: 5970 From: Gernot Date: 11/6/2012
Subject: Re: comunication KMotionCNC to Kflop
Hi Tom,

today i flash the init.c to User memory and new start the system....
now i press zero button and .... NULL :o
Previously never flash to User Memory is this the problem?

My system is on the desktop and is not connected to the steppers.
Before I could really use it I want test it.

Thanks Tom


--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Gerry,
>  
> What type of system/drives do you have?  You have Step/Dir + Encoders?  What kind of encoders?
>  
> When things are working correctly the Encoder Position should match the Step/Dir Destination
>  
> After in your example when you move to DRO=100.0 go to the KMotion.exe Axis Screen and look at the Position and Destination.  Do they match?  (within several counts?).
>  
> If not the resolution of your encoder may be different then your Steps.  You can use the InputGain0 parameter to match the resolutions.
>  
> If you do a Move on the Step Response the Positions and Destinations should match (red and blue plots).  Is this true?
>  
> The Zero button computes a G92 offset such that the commanded Destination in GCode coordinates will become zero (green plot), the encoder position in GCode coordinates (blue plot) should also be zero or very close to zero depending on the error in the system.
>  
> You might also consider using closed loop step/dir mode.  This would drive the motor so the measured encoder position matches the commanded destination more exactly.  But do this only after you have the encoder and command matching as close as possible in open loop mode.
>  
> Regards
> TK
>  
>  
>  
>  
>  
>
Group: DynoMotion Message: 5973 From: Tom Kerekes Date: 11/6/2012
Subject: Re: comunication KMotionCNC to Kflop
Hi Gerry,

We don't recommend you flash to User Memory.  It is more straightforward to just let the C program initialize the board each time.  The only time you really need to User Flash things into memory is if you are running stand alone without a PC in your system.  You can restore the default settings into the board using the Flash "New Version" button.

If you don't have steppers or encoders (that move with the steppers) connected then you can not expect the encoder position to change properly.

Regards
TK

Group: DynoMotion Message: 5974 From: Gernot Date: 11/6/2012
Subject: Re: comunication KMotionCNC to Kflop
Hi tom,

My encoders are linear glas scales i move it manuaell.
Many read but verry hard to understand all.
Next problem waiting of me with kflop and mach3 config :(


Regards
Gerry

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Gerry,
>
> We don't recommend you flash to User Memory.  It is more straightforward to just let the C program initialize the board each time.  The only time you really need to User Flash things into memory is if you are running stand alone without a PC in your system.  You can restore the default settings into the board using the Flash "New Version" button.
>
> If you don't have steppers or encoders (that move with the steppers) connected then you can not expect the encoder position to change properly.
>
>
> Regards
> TK
>
>
>
>
> ________________________________
> From: Gernot <web.work@...>
> To: DynoMotion@yahoogroups.com
> Sent: Tuesday, November 6, 2012 3:57 AM
> Subject: [DynoMotion] Re: comunication KMotionCNC to Kflop
>
>
>  
> Hi Tom,
>
> today i flash the init.c to User memory and new start the system....
> now i press zero button and .... NULL :o
> Previously never flash to User Memory is this the problem?
>
> My system is on the desktop and is not connected to the steppers.
> Before I could really use it I want test it.
>
> Thanks Tom
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Gerry,
> >  
> > What type of system/drives do you have?  You have Step/Dir + Encoders?  What kind of encoders?
> >  
> > When things are working correctly the Encoder Position should match the Step/Dir Destination
> >  
> > After in your example when you move to DRO=100.0 go to the KMotion.exe Axis Screen and look at the Position and Destination.  Do they match?  (within several counts?).
> >  
> > If not the resolution of your encoder may be different then your Steps.  You can use the InputGain0 parameter to match the resolutions.
> >  
> > If you do a Move on the Step Response the Positions and Destinations should match (red and blue plots).  Is this true?
> >  
> > The Zero button computes a G92 offset such that the commanded Destination in GCode coordinates will become zero (green plot), the encoder position in GCode coordinates (blue plot) should also be zero or very close to zero depending on the error in the system.
> >  
> > You might also consider using closed loop step/dir mode.  This would drive the motor so the measured encoder position matches the commanded destination more exactly.  But do this only after you have the encoder and command matching as close as possible in open loop mode.
> >  
> > Regards
> > TK
> >  
> >  
> >  
> >  
> >  
> >
>